package activitys;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;

import com.boboqi.test.R;

import adapters.RecyclerViewAdaper;

/**
 * Created by pc on 2017/3/3.
 */

public class RecyclerViewActivity extends AppCompatActivity {

    private RecyclerView rcv;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_recyclerview);
        rcv = (RecyclerView) findViewById(R.id.rcv);
        RecyclerView.LayoutManager mContentLayoutManager = new LinearLayoutManager(this);
        rcv.setLayoutManager(mContentLayoutManager);
        rcv.setAdapter(new RecyclerViewAdaper());
    }
}
